import request from '@/plugin/axios'

export function tree(rootId) {
    return request({
        url: '/admin/menu/tree',
        method: 'get',
        params: rootId
    })
}

export function deleteById(id) {
    return request({
        url: '/admin/menu/' + id,
        method: 'delete'
    })
}

export function save(obj) {
    return request({
        url: '/admin/menu',
        method: 'post',
        data: obj
    })
}


export function update(obj) {
    return request({
        url: '/admin/menu',
        method: 'put',
        data: obj
    })
}

